#include "ThreadPool.hpp"
#include "Task.hpp"
#include <unistd.h>
#include <iostream>
int main()
{
    EnableScreen();
    srand((unsigned int)time(nullptr));
    int cnt = 10;
    // ThreadPool<Task> *tp = new ThreadPool<Task>();
    // tp->init();
    // tp->Start();
    while (cnt--)
    {
        sleep(1);
        Task t((rand() + getpid()) % 100, (rand() ^ getpid()) % 100);
        // tp->Equeue(t);
        ThreadPool<Task>::GetInstance()->Equeue(t);
        LOG(FATAL,"equeue a task, %s\n",t.debug().c_str());
        // ThreadPool<Task>::GetInstance()->Equeue(t);
    }
    // tp->Stop();
    ThreadPool<Task>::GetInstance()->Stop();

    return 0;
}